package com.sinven.entity;

import javax.persistence.*;

/**
 * NideshopChannel entity. @author MyEclipse Persistence Tools
 */
/**
 * 李志伟
 * 反向生成
 */
@Entity
@Table(name = "nideshop_channel", catalog = "csf")
public class Channel implements java.io.Serializable {

    // Fields


    private Integer id;
    private String name;
    private String url;
    private String iconUrl;

    // Constructors

    /** default constructor */
    public Channel() {
    }

    /** full constructor */
    public Channel(String name, String url, String iconUrl
                   ) {
        this.name = name;
        this.url = url;
        this.iconUrl = iconUrl;
    }

    // Property accessors
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    public Integer getId() {
        return this.id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Column(name = "name", nullable = false, length = 45)
    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Column(name = "url", nullable = false)
    public String getUrl() {
        return this.url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Column(name = "icon_url", nullable = false)
    public String getIconUrl() {
        return this.iconUrl;
    }

    public void setIconUrl(String iconUrl) {
        this.iconUrl = iconUrl;
    }

    @Override
    public String toString() {
        return "Channel{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", url='" + url + '\'' +
                ", iconUrl='" + iconUrl + '\'' +
                '}';
    }
}